package com.palm.hubo2o.network;

import com.google.gson.annotations.Expose;

import java.util.Date;

/**
 * Created by wongqi on 16/6/7.
 */
public class Result<T> {
    @Expose
    private String statusCode;
    @Expose
    private String message;
    @Expose
    private Date serverTime;
    @Expose
    private T body;

    public Date getServerTime() {
        return serverTime;
    }

    public void setServerTime(Date serverTime) {
        this.serverTime = serverTime;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public boolean isSuccessful() {
        return "0000".equals(statusCode);
    }
}
